// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

import sceneMediator from "../../framework/sceneMediator";

const {ccclass, property} = cc._decorator;

@ccclass
export default class nextSeeVideo extends cc.Component {

    @property(cc.Node)
    backNode : cc.Node = null;

    protected onLoad(): void {
        this.scheduleOnce(()=>{
            this.backNode.active = true;
        },2);
    }

    btnClick(event,data){
       if(parseInt(data) == 1){
            sceneMediator.LoadNextScene();
       }

       if(parseInt(data) == 2){
            this.node.destroy();
       }
   }
}
